package com.cqnu.service.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.cqnu.dao.StudentDao;
import com.cqnu.entity.Student;
import com.cqnu.service.IStudentService;
@Service("studentService")
public class StudentServiceImpl implements IStudentService{

	@Resource
	private StudentDao studentDao;
	public Student login(Student stu) {
		return studentDao.login(stu);
	}

	public List<Student> find(Map<String, Object> map) {
		return studentDao.find(map);
	}

	public Long getTotal(Map<String, Object> map) {
		return studentDao.getTotal(map);
	}

	public int update(Student stu) {
		return studentDao.update(stu);
	}

	public int add(Student stu) {
		return studentDao.add(stu);
	}

	public int delete(Integer id) {
		return studentDao.delete(id);
	}

	@Override
	public Student getById(Integer id) {
		// TODO Auto-generated method stub
		return studentDao.getById(id);
	}

}
